﻿using SpotOffer.Resource;

namespace SpotOffer.DataModels
{
    public class Deal
    {

        public string id { get; set; }
        public string provider { get; set; }
        public string title { get; set; }
        public string image { get; set; }
        public string image_src { get; set; }
        public string url { get; set; }

        public string price_orig
        {
            get { return _price_orig; }
            set
            {
                if (value != null & value.Length > 1)
                {
                    _price_orig = AppResources.Before + " " + value;
                }
                else
                {
                    _price_orig = "";
                }

            }
        }
        private string _price_orig;

        public string price
        {
            get { return _price; }
            set
            {
                if (value != null & value.Length > 1)
                {
                    _price = AppResources.Now+" " + value;
                }
                else
                {
                    _price = "";
                }


            }
        }
        private string _price;
       
        public string discount
        {
            get { return _discount; }
            set
            {
                if (value != null& value.Length>1)
                {
                    _discount = AppResources.Save + " " + value;
                }
                else
                {
                    _discount = "";
                }
            }

        }
        private string _discount;

        public string category { get; set; }
        public int is_new { get; set; }
        public string imagecellprice { get; set; }
    }
}
